package ioc;

/**
 * Bean 工厂
 */
public interface BeanFactory {
    /**
     * 获取 bean 对象
     *
     * @param name  BeanName
     * @return
     * @throws Exception
     */
    Object getBean(String name) throws Exception;

    /**
     * 创建 Bean 对象
     *
     * @param beanDefinition {@link BeanDefinition}
     * @return
     * @throws Exception
     */
    Object createBean(BeanDefinition beanDefinition) throws Exception;
}
